import Vue from 'vue'
import VueRouter from 'vue-router'
import router from '@/router'
import Vuex from 'vuex'
import store from '@/store'
import App from './App.vue'
import vSelectPage from 'v-selectpage'
import less from 'less'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css';
import ElementUI from 'element-ui';

import modelMove from '@/components/modelMove/index.js'

import 'element-ui/lib/theme-chalk/index.css';
import './common/css/base.css'
import './utils/directives.js'
import eleconfig from './components/elecomponent/index.js'
Vue.use(eleconfig)

import fullscreen   from 'vue-fullscreen'
Vue.use(fullscreen)
import DrawFlow from "./components/DrawFlow";
Vue.use(DrawFlow);

import remJs from './utils/rem'
remJs()
Vue.config.productionTip = false

Vue.use(VueRouter)
Vue.use(Vuex)
Vue.use(ElementUI);
Vue.use(Antd);
Vue.use(less)
Vue.use(modelMove)


Vue.use(vSelectPage, {
    // server side data loader
    dataLoad: function(vue, data, params) {
        return new Promise((resolve, reject) => {
            axios.post(url, params).then(resp => resolve(resp), resp => reject(resp))
        })
    }
})

new Vue({
    router,
    render: h => h(App),
    store
}).$mount('#app')